<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改报警信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-centralControllerAlarmInfo-edit" th:object="${topCentralControllerAlarmInfo}">
            <input name="id" th:field="*{id}" type="hidden">
    <div class="form-group">
        <label class="col-sm-3 control-label">报警代码：</label>
        <div class="col-sm-8">
            <input name="alarmCode" th:field="*{alarmCode}" type="text" class="form-control" >
        </div>
    </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">设备类型编号：</label>
                <div class="col-sm-8">
                    <select name="deviceTypeId" class="form-control m-b">
                        <option value="">所有</option>
                    </select>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">报警详情：</label>
                <div class="col-sm-8">
                    <input name="alarmDetail" th:field="*{alarmDetail}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">解决方法：</label>
                <div class="col-sm-8">
                    <input name="solution" th:field="*{solution}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('data_normal_disable')}">
                        <input type="radio" th:id="${'state_' + dict.dictCode}" name="state" th:value="${dict.dictValue}" th:field="*{state}">
                        <label th:for="${'state_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
    <div class="form-group">
        <label class="col-sm-3 control-label">权重：</label>
        <div class="col-sm-8">
            <input name="weight" th:field="*{weight}" type="text" class="form-control" >
        </div>
    </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">描述：</label>
                <div class="col-sm-8">
                    <textarea name="remark" class="form-control">[[*{remark}]]</textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "central/centralControllerAlarmInfo";
        $("[name=alarmCode]").inputSpinner();
        $("[name=weight]").inputSpinner();

        $("#form-centralControllerAlarmInfo-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operation.update(prefix, $.common.formToJSON());
            }
        }
    </script>
</body>
</html>